/*
 * laneLineStruct.h
 *
 *  Created on: May 9, 2018
 *      Author: geoff
 */

#ifndef LDW_LANE_LINE_STRUCT_H_
#define LDW_LANE_LINE_STRUCT_H_

#include <opencv2/core/core.hpp>
#include <vector>

namespace rmd {

struct KeyLine {
  double fRho;
  double fK;
  double fB;
  int nDistance;
  cv::Point ptUpPoint;
  cv::Point ptDownPoint;
  cv::Point ptUpExtendPoint;
  cv::Point ptDownExtendPoint;
  long nIndex;
  int nCluter;
  bool bIsgoodLine;
  bool bIsUse;
  bool field_id;
};

struct LaneLine {
  double factor[4];
  int nDistance[2];
  float angle[2];
  cv::Point near_field[4];
  cv::Point middle_field[4];
  cv::Point Line_current[4];
  cv::Point Line_now[4];
  cv::Point Line_pre[4];
  long nIndex;
  int nCluter;
  short nQuality;
  bool bIsTrue;
  short int nLineType;
  float pCenterTop;
  float pCenter;
  float pCenterBottom;
  short int nIsCurLane;
};

struct LaneResult {
    int nDistance[2];
    float angle[2];
    cv::Point Line_current[4];
    cv::Point Line_now[4];
    cv::Point Line_pre[4];
      long nIndex;
      short  nQuality;
      float pCenterTop;
      float pCenter;
      float pCenterBottom;
      short  nIsCurLane;
      short  nLineType;
      bool bIsTrue;
};

///gInitLD_VP
typedef struct INITLDVP
{
  float x;
  float y;
  cv::Point left_point[2];
  cv::Point right_point[2];
}InitLdVp;

struct PRILANERESULT{
    short      sIsUse;
    cv::Point leftTopPoint;
    cv::Point leftCenterPoint;
    cv::Point leftBottomPoint;
    float lRho;

    cv::Point rightTopPoint;
    cv::Point rightCenterPoint;
    cv::Point rightBottomPoint;
    float rRho;
};

struct CurrentShowLine {
  float left_top;
  float left_location;
  float left_bottom;
  float left_rho;
  long  left_index;

  float right_top;
  float right_location;
  float right_bottom;
  float right_rho;
  long  right_index;

  bool bflag;
};

struct VirtualCenterLine {
  cv::Point pixel[3];
  cv::Point init[3];
  short sflag;
};

struct CALMCARLDWDATA
{
  short sDepartureOrientation;   //1-normal 2-left 3-right 0-no value
  short sLaneDetectionResult;    //left,current,right 0 0 0 - 1 1 1  0-7
  cv::Point leftZone[7];    //first point- line type ,6 points closed area
  cv::Point currentZone[7];
  cv::Point rightZone[7];
  cv::Point virtaulPoint[3];
};


} /* namespace rmd */

#endif /* SRC_LANE_LINE_H_ */
